home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2004 #2
/
Amiga Plus CD - 2004 - No. 02.iso
/
AmigaPlus
/
Tools
/
Development
/
AmigaTalk
/
general
/
Magnitude.st
< prev
next >
Wrap
Text File
|
2004-01-31
|
502b
|
30 lines
Class Magnitude :Object
[
<= arg
^ (self < arg) or: [self = arg]
|
< arg
^ (arg > self)
|
= arg
^ (self > arg or: [self < arg]) not
|
~= arg
^ (self = arg) not
|
>= arg
^ (self > arg) or: [self = arg]
|
> arg
^ arg < self
|
between: low and: high
^ (self >= low) and: [self <= high]
|
min: arg
^ (self < arg) ifTrue: [self] ifFalse: [arg]
|
max: arg
^ (self > arg) ifTrue: [self] ifFalse: [arg]
]